Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

refactor(production): remove duplicate expression #16738

Closed
wants to merge 1 commit into from

Conversation

teresy
Copy link
Contributor

@teresy teresy commented Oct 19, 2018

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Refactors a (suspected) redundant check on duplicate subexpressions.

What is the current behavior? (You can also link to an open issue here)

The line is:

var versionPath = versionInfo.currentVersion.isSnapshot ?
  'snapshot' :
  (versionInfo.currentVersion.version || versionInfo.currentVersion.version);

What is the new behavior (if this is a feature change)?

Should be the same. The change removes a duplicate subexpression (the left and right sides of || both check versionInfo.currentVersion.version).

Does this PR introduce a breaking change?

No.

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:

This commit is the most recent I found where these expressions differ. My best guess is the duplicated expression can be removed, unless I'm missing something.

Remove a duplicate expression (the left and right sides both check `versionInfo.currentVersion.version`). [48f0957](https://github.com/angular/angular.js/blob/48f0957dde728b050e2d8f76db81cbf12cffd42a/docs/config/services/deployments/production.js#L18) is the most recent commit I found where these expressions differ. My best guess is the duplicated expression can be removed.
@petebacondarwin petebacondarwin added this to the 1.7.x milestone Oct 19, 2018
@gkalpak gkalpak closed this in 362dd17 Nov 15, 2018
gkalpak pushed a commit that referenced this pull request Nov 15, 2018
Remove a duplicate expression (the left and right sides both check `versionInfo.currentVersion.version`). [48f0957](https://github.com/angular/angular.js/blob/48f0957dde728b050e2d8f76db81cbf12cffd42a/docs/config/services/deployments/production.js#L18) is the most recent commit I found where these expressions differ. My best guess is the duplicated expression can be removed.

Closes #16738
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants